package com.swust.course.service.impl;

import java.util.List;
import com.swust.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.swust.course.mapper.CourseTechClassMapper;
import com.swust.course.domain.CourseTechClass;
import com.swust.course.service.ICourseTechClassService;

/**
 * 授课班级对应Service业务层处理
 * 
 * @author LiuShuai
 * @date 2024-04-05
 */
@Service
public class CourseTechClassServiceImpl implements ICourseTechClassService 
{
    @Autowired
    private CourseTechClassMapper courseTechClassMapper;

    /**
     * 查询授课班级对应
     * 
     * @param createBy 授课班级对应主键
     * @return 授课班级对应
     */
    @Override
    public CourseTechClass selectCourseTechClassByCreateBy(String createBy)
    {
        return courseTechClassMapper.selectCourseTechClassByCreateBy(createBy);
    }

    /**
     * 查询授课班级对应列表
     * 
     * @param courseTechClass 授课班级对应
     * @return 授课班级对应
     */
    @Override
    public List<CourseTechClass> selectCourseTechClassList(CourseTechClass courseTechClass)
    {
        return courseTechClassMapper.selectCourseTechClassList(courseTechClass);
    }

    /**
     * 新增授课班级对应
     * 
     * @param courseTechClass 授课班级对应
     * @return 结果
     */
    @Override
    public int insertCourseTechClass(CourseTechClass courseTechClass)
    {
        courseTechClass.setCreateTime(DateUtils.getNowDate());
        return courseTechClassMapper.insertCourseTechClass(courseTechClass);
    }

    /**
     * 修改授课班级对应
     * 
     * @param courseTechClass 授课班级对应
     * @return 结果
     */
    @Override
    public int updateCourseTechClass(CourseTechClass courseTechClass)
    {
        courseTechClass.setUpdateTime(DateUtils.getNowDate());
        return courseTechClassMapper.updateCourseTechClass(courseTechClass);
    }

    /**
     * 批量删除授课班级对应
     * 
     * @param createBys 需要删除的授课班级对应主键
     * @return 结果
     */
    @Override
    public int deleteCourseTechClassByCreateBys(String[] createBys)
    {
        return courseTechClassMapper.deleteCourseTechClassByCreateBys(createBys);
    }

    /**
     * 删除授课班级对应信息
     * 
     * @param createBy 授课班级对应主键
     * @return 结果
     */
    @Override
    public int deleteCourseTechClassByCreateBy(String createBy)
    {
        return courseTechClassMapper.deleteCourseTechClassByCreateBy(createBy);
    }
}
